import java.net.*;

public class ShowHostInfo
{
  public ShowHostInfo()
  {
  try {
  InetAddress local = InetAddress.getLocalHost();
  System.out.println ("getLocalHost = " + InetAddress.getLocalHost());
  System.out.println ("getHostname = " + local.getHostName());
  System.out.println ("getHostAddress = " + local.getHostAddress());
  System.out.println("getCanonicalHostName = " + local.getCanonicalHostName());

  }
  catch (Exception e)
  {
  e.printStackTrace();
  }
  }

  /**
   *
   * @param args
   */
  public static void main(String[] args)
  {
    ShowHostInfo showHostInfo = new ShowHostInfo();
  }
}


